package org.lemon.cla.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.lemon.cla.enums.ClubMemberRoleEnum; // 导入社团成员角色枚举
import org.lemon.cla.enums.ClubMemberStatusEnum; // 导入社团成员状态枚举

import java.time.LocalDateTime;

@Data
@TableName("club_member")
@Schema(description = "社团成员实体")
public class ClubMember {

    @TableId(value = "member_id", type = IdType.AUTO)
    @Schema(description = "成员ID", example = "1")
    private Long memberId;

    @TableField("user_id")
    @Schema(description = "用户ID (外键，关联用户表)", example = "1")
    private Long userId;

    @TableField("club_id")
    @Schema(description = "社团ID (外键，关联社团表)", example = "1")
    private Long clubId;

    @TableField("join_time")
    @Schema(description = "加入时间", example = "2024-06-22T10:00:00")
    private LocalDateTime joinTime;

    @Schema(description = "社团内角色", example = "成员", allowableValues = {"成员", "社长"})
    private ClubMemberRoleEnum role;

    @Schema(description = "成员状态", example = "申请中", allowableValues = {"申请中", "已加入", "已拒绝"})
    private ClubMemberStatusEnum status;
}